import { axios } from '@/utils/request'

/**
 * 查询排课-with-name
 *
 * @author kongxm
 * @date 2022-07-11 11:31:12
 */
export function courseSchedulePageWithName(parameter) {
  return axios({
    url: '/courseSchedule/pageWithName',
    method: 'get',
    params: parameter
  })
}

/**
 * 查询排课
 *
 * @author kongxm
 * @date 2022-07-11 11:31:12
 */
export function courseSchedulePage(parameter) {
  return axios({
    url: '/courseSchedule/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 排课列表
 *
 * @author kongxm
 * @date 2022-07-11 11:31:12
 */
export function courseScheduleList(parameter) {
  return axios({
    url: '/courseSchedule/list',
    method: 'get',
    params: parameter
  })
}

/**
 * 添加排课
 *
 * @author kongxm
 * @date 2022-07-11 11:31:12
 */
export function courseScheduleAdd(parameter) {
  return axios({
    url: '/courseSchedule/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑排课
 *
 * @author kongxm
 * @date 2022-07-11 11:31:12
 */
export function courseScheduleEdit(parameter) {
  return axios({
    url: '/courseSchedule/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除排课
 *
 * @author kongxm
 * @date 2022-07-11 11:31:12
 */
export function courseScheduleDelete(parameter) {
  return axios({
    url: '/courseSchedule/delete',
    method: 'post',
    data: parameter
  })
}

/**
 * 导出排课
 *
 * @author kongxm
 * @date 2022-07-11 11:31:12
 */
export function courseScheduleExport(parameter) {
  return axios({
    url: '/courseSchedule/export',
    method: 'get',
    params: parameter,
    responseType: 'blob'
  })
}


/**
 * 发布
 *
 * @author kongxm
 * @date 2022-07-07 21:52:25
 */
export function courseSchedulePublish(publishScheduleId) {
  return axios({
    url: `/courseSchedule/publish/${publishScheduleId}`,
    method: 'post'
  })
}

/**
 * 撤回
 *
 * @author kongxm
 * @date 2022-07-07 21:52:25
 */
export function courseScheduleRollback(publishScheduleId) {
  return axios({
    url: `/courseSchedule/rollback/${publishScheduleId}`,
    method: 'post'
  })
}